package com.guoxin.chapter3;

/**
 * @author guoxin
 * @date 2019/9/22
 */
public class BigObject {

    private static final int _1MB = 1024 * 1024;

    /**
     * VM参数：-verbose:gc -Xms20M -Xmx20M -Xmn10M -XX:SurvivorRatio=8
     */
    public static void testPretenureSizeThreshold(){
        byte [] allocation;
        allocation = new byte[4*_1MB];// 直接分配在老年代中
    }

    public static void main(String[] args) {
        testPretenureSizeThreshold();
    }
}
